package implementsstatic.test;

import implementsstatic.ImplementsStatic;


@ImplementsStatic(
		value={Zero.class, VectorUtils.class},
		actualTypeParameters={Vector2D.class, Vector2D.class}
)
public class Vector2D extends Vector<Vector2D> {
	
	private final int x;
	private final int y;
	
	public Vector2D(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public static Vector2D zero() {
		return new Vector2D(0, 0);
	}

	@Override
	public Vector2D plus(Vector2D v) {
		return new Vector2D(x+v.x, y+v.y);
	}
	
	public static <A extends Vector2D, B extends Vector2D>
			Vector2D plus(A u, B w) {
		return u.plus(w);
	}

}
